<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <input type="text" id="inputdom">
  <div style="border: 1px solid black; width: 200px; height: 20px;">
    <span id="spandom"></span>
  </div>


  <script>
    const inputdom = document.getElementById('inputdom');
    const spandom = document.getElementById('spandom');

    inputdom.addEventListener('input', (event) => {
      spandom.textContent = event.target.value;
      console.log(event)
    })

  </script>

</body>

</html>